import { Application } from 'express'
import bodyParser from 'body-parser'
import passport from 'passport'
import strategy from './strategy'
import checker from './checker'

passport.use(strategy)

export default function (app: Application) {
  app.use(bodyParser.json({
    limit: '50mb'
  }))
  app.use(bodyParser.urlencoded({
    limit: '50mb',
    extended: true
  }))

  app.use(passport.initialize())
  app.use(checker)
}
